package com.cloudcc.mobile.dialog;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.StyleRes;
import android.view.View;
import android.widget.TextView;

import com.baidu.mapapi.map.Text;
import com.cloudcc.mobile.R;

/**
 * Created by lin on 2017/10/24.
 */

public class MakeTureDialog extends Dialog {

    private TextView title_text, bt_text;

    public MakeTureDialog(@NonNull Context context) {
        super(context);
    }

    public MakeTureDialog(@NonNull Context context, @StyleRes int themeResId) {
        super(context, themeResId);
    }

    protected MakeTureDialog(@NonNull Context context, boolean cancelable, @Nullable OnCancelListener cancelListener) {
        super(context, cancelable, cancelListener);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.dialog_maekture);

        title_text = (TextView) findViewById(R.id.maketure_title);
        bt_text = (TextView) findViewById(R.id.maketure_queding);

        bt_text.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                dismiss();
            }
        });
    }

    public void setTitleAndBt(String titles , String bts){//设置提示语和确认按钮文字
        title_text.setText(titles);
        bt_text.setText(bts);
    }

    public void setTitle(String titles){//设置提示语默认按钮为确认
        title_text.setText(titles);
    }
}
